package com.ffyc.cms.service;

import com.ffyc.cms.dao.LoginDao;
import com.ffyc.cms.model.Admin;
import com.ffyc.cms.model.Menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class LoginService {

    @Autowired
    LoginDao loginDao;


    @Transactional
    public Admin login(Admin admin){
        return loginDao.login(admin);
    }

    public List<Menu> findMenu(Admin admin) {
        return loginDao.findMenuList(admin);
    }
}
